Contents | < Browse | Browse >
To distinguish this from real pipes, I call them pseudo pipes.
You can switch them on by using FLAGS PIPE OFF .
Pseudo pipes use temporary files in T:, so they need T: that is usually
assigned in the Startup-Sequence to a directory in Ram Disk.
The commandline
List | More
(List and More are internal commands) can be simulated with
List >T:ZShellXXXX ; More <T:ZShellXXXX ; Delete T:ZShellXXXX
(XXXX is a unique number, being the same here). Note that the temporary
file has to be deleted after use. In fact ZShell does not convert the
commandline, because this would cause trouble in case of failure.
First the List command will be started and its output is written to
the file in T:, what means that this needs memory. After the List command
has been finished, More will be started. This is synchronous processing,
you have to wait for the first command to complete. The file in T: cannot
be deleted before the More command ends, so data stays in memory twice.
Internal commands that can be right to the pipe symbol:
MORE EXECUTE ZSHELL
TYPE HTYPE
STRINGS SEARCH
Additional the same commands that can be used right to real pipes can
also be used right to pseudo pipes.
Comparing pseudo pipes to real pipes:
+ Internal commands can be right to the pipe symbol
+ Easier to understand (and, for me, to implement :-)
- Synchronous, so you have to wait
- Needs much memory when handling large quantities of data
(a background shell needs only about 10KBytes)
Examples:
dir | more {view output with MORE}
info | search dh {shows the lines for DH0:, DH1: etc.}
resident|search -3|more {shows all internal residents using MORE}
list df0: | htype {maybe this looks more interesting}